<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>设备</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no,email=no,address=no"/>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <link rel="stylesheet" href="../css/zy_common.css"/>
    <link rel="stylesheet" href="../css/zy_base.css"/>
</head>
<body>
    <div class="flex_sb bw h130 plr24">
        <div>
            <p class="col3 font15" id="macno"></p>
            <p class="col9 font13 mt10" id="address"></p>
        </div>
        <button class="lookBtn color1 border1 border-r4 ptb10 plr20 font14">查看曲线统计</button>
    </div>
    <div class="detailsDiv">
        <table class="mt60 w100 details_table" cellspacing="0">
            <thead>
                <tr  class="bg-ff colw font15">
                    <th nowrap="nowrap">日期</th><th nowrap="nowrap">商品收益</th><th nowrap="nowrap">公众号收益</th><th nowrap="nowrap">日总收益</th>
                </tr>
            </thead>
            <tbody class="bw font13 col9">
                <!--<tr>-->
                    <!--<th nowrap="nowrap">2016-06-06</th><th nowrap="nowrap">￥400</th><th nowrap="nowrap">￥400</th><th nowrap="nowrap">￥400</th>-->
                <!--</tr>-->
                <!--<tr>-->
                    <!--<th nowrap="nowrap">2016-06-06</th><th nowrap="nowrap">￥400</th><th nowrap="nowrap">￥400</th><th nowrap="nowrap">￥400</th>-->
                <!--</tr>-->
                <!--<tr>-->
                    <!--<th nowrap="nowrap">2016-06-06</th><th nowrap="nowrap">￥400</th><th nowrap="nowrap">￥400</th><th nowrap="nowrap">￥400</th>-->
                <!--</tr>-->
            </tbody>
        </table>
    </div>
</body>
</html>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/dlc.js"></script>
<script>
    $(function () {
        $('#macno').text('设备编号：'+getUrlParam('macno'));
        $('#address').text('地址：'+getLocalData('device_addr'));
        $('.lookBtn').click(function () {
            location.href='./zy_income_list.html?macno='+getUrlParam('macno');
        });
        //列表
        dlctipbox.loading('请稍后');
        dlc_request('/api/deviceIncomeTotal/getDeviceIncomeTotalList',{deviceNo:getUrlParam('macno'),page:1,limit:999},function (res) {
            console.log(res);
            dlctipbox.clear();
            if(res.code==1){
                var str='';
                res.data.list.forEach(function (item,index) {
                    str+='<tr>'+
                        '<th nowrap="nowrap">'+format(item.createTime,'Y-m-d')+'</th><th nowrap="nowrap">￥'+item.payPaperSum+'</th><th nowrap="nowrap">￥'+item.gzhIncomeSum+'</th><th nowrap="nowrap">￥'+item.incomeTotal+'</th>'+
                        '</tr>';
                });
                if(str){
                    $('.detailsDiv tbody').html(str);
                }else{
                    $('.detailsDiv').html(emptyTip('暂无数据'));
                }

            }
        });
    })
</script>